import { observable, computed, action } from 'mobx';
import { Promise } from 'drunk-base';
import { getPageList, deletePage, search } from './PageHttpResource';
import { IStandarPageModel } from './PageModel';
import { ListModel, IPageMetaData } from '../../../ListModel';

export class StandardPageListModel extends ListModel<IStandarPageModel> {

    deleteItemImpl(id: string) {
        return deletePage(id);
    }

    fetchListImpl(page: number, size: number) {
        return getPageList(page, size);
    }

    searchImpl(name: string, startTime: number, endTime: number, page: number, size: number) {
        return search(name, startTime, endTime, page, size);
    }
}